package com.longchat.query;

import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import com.longchat.domain.award.Award;


@Repository
public class PermissionQuery{
	@PersistenceContext
	private EntityManager entityManager;
	
	public List<Award> findPermission(){
		String sql = "select * from award";
		Query query = entityManager.createNativeQuery(sql,Award.class);
		return query.getResultList();
	}
	 
}
